<template>
  <div>
    <div class="btn-wrap">
      <el-button type="primary" @click="handleRun">运行</el-button>
      <el-button @click="handleResetCode">重置</el-button>
    </div>
    <el-row type="flex" class="panel">
       <CODEMIRROR ref="code"></CODEMIRROR>
    </el-row>
  </div>
</template>
<script>


export default {
  data() {
    return {
      isShow: false,
      value: ""
    };
  },

  components: {},
  render(res) {
    let className = 'vuep-scoped-' + this._uid

    return h('div', {
      class: className
    }, [
      h('style')
    ])
  },
  mounted() {

  },
  methods: {
    handleResetCode() {
      this.$refs.code.resetCode();
    },
    handleRun() {
      //his.$refs.code.editor.save();
      // console.log(this.$refs.code.getValue().replace(/[\r\n]/g, ""));
      // console.log(this.$refs.code.getValue());
    }
  }
};
</script>
<style lang="scss" scoped>
.btn-wrap {
  padding: 12px;
}
.panel {
  height: 100%;
  padding:0 12px;
  .slide {
    border-right: 10px solid #f8f8f8;
  }
}
</style>

